package aaaBrowser;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;

import com.attilax.core;
import com.attilax.jsonX;
import com.attilax.net.HttpRequest;
import com.attilax.net.websitex;
import com.attilax.web.UrlX;

/**
 * {
  "username": "zhuxianwu",
  "task_id": "",
  "task_type": "login",
  "password": "123456"
}
{"task_id":"","task_status":"0","task_message":"unlogged"}
{"task_id":"","task_status":"1","task_ssid":"7g5rtlbigko495rhc9cocvcls4"}

 * @author Administrator
 *
 */
public class loginOurT {

	public static void main(String[] args) throws UnsupportedEncodingException {
		Map mp=new HashMap();
		
	//	结构：$val={'task_id':'','task_type':'login','username':’’,'password':’’}
//  Leather 806101
		mp.put("task_id", "");
		mp.put("task_type", "login");
		mp.put("username", "Leather");
		
		mp.put("password", "806101");
		String url="http://sh.weijicn.cn/api/client.php";
	 
		String param = core.toJsonStrO88(mp);
		System.out.println(param);
		String s;//=HttpRequest.		sendGet(url, URLEncoder.encode(param, "utf-8"));
		//mjj79v8v8ufep5rrnore4knk46
 String url2 = url+"?"+URLEncoder.encode(param, "utf-8");
 url2=url+"?"+UrlX.getQueryStr(mp, "utf-8");
 System.out.println(url2);
s=	websitex.WebpageContent(url2);
		//s=HttpRequest.sendPost(url, URLEncoder.encode(param, "utf-8"));
		System.out.println(s);
	}

}
